package com.sbio.udiapp.util;

import android.app.Activity;

import com.blankj.utilcode.util.StringUtils;
import com.sbio.udiapp.di.ActivityManager;

public class LogTag {

    /*@Deprecated
    public static String getTag(String func, String deviceNo) {

        return StringUtils.format("username:" + SharedPreferencesUtil.getString("username") + "device:" + deviceNo + ",func:" + func);
    }*/

    public static String getTag(String func){
        Activity currentActivity = ActivityManager.getCurrentActivity();
        String deviceNo = DefaultSharedPreferencesUtil.getDeviceNo();
        return StringUtils.format("用户名：{},设备编码：{},activity：{},功能：{}",
                SharedPreferencesUtil.getString("username"), deviceNo, currentActivity.getComponentName().getShortClassName(), func);
    }
}
